<div id="left">
 	<span class='heading3'>Last Active Threads:</span>
 	<?php include($_SERVER['DOCUMENT_ROOT']."/polls/fns_db_polls.php"); ?>
    <?php

		$result = last_active_threads();
		$row = mysqli_fetch_assoc ($result);

		do
		{
			if(strlen($row["subject"]) > 19){
				printf ("<br/><a href='/forum/view_thread.php?threadID=%s'>%s ..</a>", $row["id"], substr($row["subject"], 0, 19));
			}else{
				printf ("<br/><a href='/forum/view_thread.php?threadID=%s'>%s</a>", $row["id"], substr($row["subject"], 0, 19));
			}
    	}while ($row = mysqli_fetch_assoc($result));
	?>
	<br/><br/>
    <?php include($_SERVER['DOCUMENT_ROOT']."/polls/poll_question.php"); ?>
</div>